<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Freetype OpenGL: vector.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="style.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="content"><!-- do not remove this div! -->

<div id="top"><!-- do not remove this div! -->

  
  <div id="titlearea">
    
    <div id="projectname">Freetype OpenGL</div>
    
    
    <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
    
  </div>
  

<!--

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Freetype OpenGL
   &#160;<span id="projectnumber">0.1</span>
   </div>
   <div id="projectbrief">A high quality OpenGL text rendering engine for C</div>
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>
-->


<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">vector.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br/>
</div>
<p><a href="vector_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structvector__t.html">vector_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic vector structure.  <a href="structvector__t.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga9ab13f896bb29debbbf8175e75751ea5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structvector__t.html">vector_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga9ab13f896bb29debbbf8175e75751ea5">vector_new</a> (size_t item_size)</td></tr>
<tr class="memdesc:ga9ab13f896bb29debbbf8175e75751ea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new empty vector.  <a href="group__vector.html#ga9ab13f896bb29debbbf8175e75751ea5"></a><br/></td></tr>
<tr class="memitem:gae045e222efa8898716f8322c5667f624"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gae045e222efa8898716f8322c5667f624">vector_delete</a> (<a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:gae045e222efa8898716f8322c5667f624"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a vector.  <a href="group__vector.html#gae045e222efa8898716f8322c5667f624"></a><br/></td></tr>
<tr class="memitem:ga6ed3fefa82526009ff0763191dcd9a93"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga6ed3fefa82526009ff0763191dcd9a93">vector_get</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self, size_t index)</td></tr>
<tr class="memdesc:ga6ed3fefa82526009ff0763191dcd9a93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the item located at specified index.  <a href="group__vector.html#ga6ed3fefa82526009ff0763191dcd9a93"></a><br/></td></tr>
<tr class="memitem:ga89ea189955bd6c4873aca8288c96ad1b"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga89ea189955bd6c4873aca8288c96ad1b">vector_front</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga89ea189955bd6c4873aca8288c96ad1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the first item.  <a href="group__vector.html#ga89ea189955bd6c4873aca8288c96ad1b"></a><br/></td></tr>
<tr class="memitem:ga1b74708d66280dbf5865bb51e8f5c394"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga1b74708d66280dbf5865bb51e8f5c394">vector_back</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga1b74708d66280dbf5865bb51e8f5c394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the last item.  <a href="group__vector.html#ga1b74708d66280dbf5865bb51e8f5c394"></a><br/></td></tr>
<tr class="memitem:ga3449b56bc57599ceca39ee5960057ac4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga3449b56bc57599ceca39ee5960057ac4">vector_contains</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self, const void *item, int(*cmp)(const void *, const void *))</td></tr>
<tr class="memdesc:ga3449b56bc57599ceca39ee5960057ac4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if an item is contained within the vector.  <a href="group__vector.html#ga3449b56bc57599ceca39ee5960057ac4"></a><br/></td></tr>
<tr class="memitem:ga0d33ab9aaff247d38876b1fe76c4e2ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga0d33ab9aaff247d38876b1fe76c4e2ef">vector_empty</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga0d33ab9aaff247d38876b1fe76c4e2ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the vector is empty.  <a href="group__vector.html#ga0d33ab9aaff247d38876b1fe76c4e2ef"></a><br/></td></tr>
<tr class="memitem:ga0103842074bb797fc685b33c0629c05a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga0103842074bb797fc685b33c0629c05a">vector_size</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga0103842074bb797fc685b33c0629c05a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of items.  <a href="group__vector.html#ga0103842074bb797fc685b33c0629c05a"></a><br/></td></tr>
<tr class="memitem:ga1a1e63e13a4da5587aa0b9369580eb85"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga1a1e63e13a4da5587aa0b9369580eb85">vector_reserve</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t size)</td></tr>
<tr class="memdesc:ga1a1e63e13a4da5587aa0b9369580eb85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserve storage such that it can hold at last size items.  <a href="group__vector.html#ga1a1e63e13a4da5587aa0b9369580eb85"></a><br/></td></tr>
<tr class="memitem:ga94c636cfdfd80206e765331d8b44651e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga94c636cfdfd80206e765331d8b44651e">vector_capacity</a> (const <a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga94c636cfdfd80206e765331d8b44651e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns current storage capacity.  <a href="group__vector.html#ga94c636cfdfd80206e765331d8b44651e"></a><br/></td></tr>
<tr class="memitem:ga0b9c4f4cf48f0c52daa7852aeb7e531c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga0b9c4f4cf48f0c52daa7852aeb7e531c">vector_shrink</a> (<a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga0b9c4f4cf48f0c52daa7852aeb7e531c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrease capacity to fit actual size.  <a href="group__vector.html#ga0b9c4f4cf48f0c52daa7852aeb7e531c"></a><br/></td></tr>
<tr class="memitem:gaa24245f42c8bb6f84933133f6a560deb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gaa24245f42c8bb6f84933133f6a560deb">vector_clear</a> (<a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:gaa24245f42c8bb6f84933133f6a560deb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all items.  <a href="group__vector.html#gaa24245f42c8bb6f84933133f6a560deb"></a><br/></td></tr>
<tr class="memitem:ga50c566682c6ec48ef8f7f4224c112d03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga50c566682c6ec48ef8f7f4224c112d03">vector_set</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t index, const void *item)</td></tr>
<tr class="memdesc:ga50c566682c6ec48ef8f7f4224c112d03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace an item.  <a href="group__vector.html#ga50c566682c6ec48ef8f7f4224c112d03"></a><br/></td></tr>
<tr class="memitem:ga99460cea333533ca48e5cb23c37642f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga99460cea333533ca48e5cb23c37642f0">vector_erase</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t index)</td></tr>
<tr class="memdesc:ga99460cea333533ca48e5cb23c37642f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase an item.  <a href="group__vector.html#ga99460cea333533ca48e5cb23c37642f0"></a><br/></td></tr>
<tr class="memitem:ga089b70be0dbd06c497470359e725b4ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga089b70be0dbd06c497470359e725b4ef">vector_erase_range</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t first, const size_t last)</td></tr>
<tr class="memdesc:ga089b70be0dbd06c497470359e725b4ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase a range of items.  <a href="group__vector.html#ga089b70be0dbd06c497470359e725b4ef"></a><br/></td></tr>
<tr class="memitem:ga0934c3049233d3688b7fa74e23536bbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga0934c3049233d3688b7fa74e23536bbf">vector_push_back</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const void *item)</td></tr>
<tr class="memdesc:ga0934c3049233d3688b7fa74e23536bbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends given item to the end of the vector.  <a href="group__vector.html#ga0934c3049233d3688b7fa74e23536bbf"></a><br/></td></tr>
<tr class="memitem:ga03f7948a7302fda208afe31bf7f324eb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#ga03f7948a7302fda208afe31bf7f324eb">vector_pop_back</a> (<a class="el" href="structvector__t.html">vector_t</a> *self)</td></tr>
<tr class="memdesc:ga03f7948a7302fda208afe31bf7f324eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes the last item of the vector.  <a href="group__vector.html#ga03f7948a7302fda208afe31bf7f324eb"></a><br/></td></tr>
<tr class="memitem:gae88ff6d21d8f963ba97790086d18506a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gae88ff6d21d8f963ba97790086d18506a">vector_resize</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t size)</td></tr>
<tr class="memdesc:gae88ff6d21d8f963ba97790086d18506a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resizes the vector to contain size items.  <a href="group__vector.html#gae88ff6d21d8f963ba97790086d18506a"></a><br/></td></tr>
<tr class="memitem:gaa69087a65fe41ccc9a6763053a0db7da"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gaa69087a65fe41ccc9a6763053a0db7da">vector_insert</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t index, const void *item)</td></tr>
<tr class="memdesc:gaa69087a65fe41ccc9a6763053a0db7da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert a single item at specified index.  <a href="group__vector.html#gaa69087a65fe41ccc9a6763053a0db7da"></a><br/></td></tr>
<tr class="memitem:gaea8a2ae4d0d06d93f38b24697a5ac5ec"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gaea8a2ae4d0d06d93f38b24697a5ac5ec">vector_insert_data</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const size_t index, const void *data, const size_t count)</td></tr>
<tr class="memdesc:gaea8a2ae4d0d06d93f38b24697a5ac5ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert raw data at specified index.  <a href="group__vector.html#gaea8a2ae4d0d06d93f38b24697a5ac5ec"></a><br/></td></tr>
<tr class="memitem:gaabe89daaacdda4c42daf166e2f52f159"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gaabe89daaacdda4c42daf166e2f52f159">vector_push_back_data</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, const void *data, const size_t count)</td></tr>
<tr class="memdesc:gaabe89daaacdda4c42daf166e2f52f159"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append raw data to the end of the vector.  <a href="group__vector.html#gaabe89daaacdda4c42daf166e2f52f159"></a><br/></td></tr>
<tr class="memitem:gaee95bbc2e143793c2ffdf3f107aac1bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vector.html#gaee95bbc2e143793c2ffdf3f107aac1bd">vector_sort</a> (<a class="el" href="structvector__t.html">vector_t</a> *self, int(*cmp)(const void *, const void *))</td></tr>
<tr class="memdesc:gaee95bbc2e143793c2ffdf3f107aac1bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sort vector items according to cmp function.  <a href="group__vector.html#gaee95bbc2e143793c2ffdf3f107aac1bd"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author:</dt><dd>Nicolas Rougier (<a href="#" onclick="location.href='mai'+'lto:'+'Nic'+'ol'+'as.'+'Ro'+'ugi'+'er'+'@in'+'ri'+'a.f'+'r'; return false;">Nicol<span style="display: none;">.nosp@m.</span>as.R<span style="display: none;">.nosp@m.</span>ougie<span style="display: none;">.nosp@m.</span>r@in<span style="display: none;">.nosp@m.</span>ria.f<span style="display: none;">.nosp@m.</span>r</a>) </dd></dl>
</div></div><!-- contents -->
</div>
</body>
</html>
